package cn.langpy.dblistener.listener;

import cn.langpy.dblistener.core.EventListener;
import cn.langpy.dblistener.core.model.transform.EventRow;

import java.util.logging.Logger;

public class ConsoleListener implements EventListener {
    private static Logger log = Logger.getLogger(ConsoleListener.class.toString());

    @Override
    public void onInsert(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());
    }

    @Override
    public void onUpdate(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }

    @Override
    public void onDelete(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }

    @Override
    public void onRead(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }

    @Override
    public void onAlter(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }

    @Override
    public void onTruncate(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }

    @Override
    public void onDrop(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }

    @Override
    public void onCreate(EventRow eventRow) {
        log.info("【"+eventRow.getOperate()+"】"+eventRow.toString());

    }
}
